package com.blog.cloud.dao;

import java.util.List;

import com.blog.cloud.comm.modal.pojo.Enums;
import com.blog.cloud.comm.webutils.CommMethod;

public class EnumsDao extends Enums {

	public static EnumsDao me = new EnumsDao();
	
	public static String tabName = CommMethod.getTbaleName("Enums");
	
	
	public List<Enums> geetEnumsListByKey(String key){
		String sql = "select * from "+ tabName+ " where ekey = ? AND is_delete='0'";
		return dao.find(sql, key);
	}
	
	public Enums geetEnumsByKey(String key){
		Enums enums = null;
		List<Enums> geetEnumsByKey = this.geetEnumsListByKey(key);
		if(geetEnumsByKey!=null && geetEnumsByKey.size()>0){
			enums = geetEnumsByKey.get(0);
		}
		return enums;
	}
	
	
}
